const salesOrderStatusEnmu = {
  0: {
    value: "待汇款",
    key: "0",
    color: "#f88f75",
    background:
      "linear-gradient(135deg, rgba(255, 255, 255, .4), transparent) #f88f75",
    border:
      "linear-gradient(to right, #fff, #fff), linear-gradient(90deg, #fff, #f88f75)",
  },
};
const stockStatusEnmu = {
  0: {
    value: "无库存",
    key: "6",
    color: "#EA3447",
    background:
      "linear-gradient(135deg, rgba(255, 255, 255, .4), transparent) #EA3447",
    border:
      "linear-gradient(to right, #fff, #fff), linear-gradient(90deg, #fff, #EA3447)",
  },
};
// 获取 任务状态
const getStatusName = (type, status) => {
  if (type == "salesOrder") {
    return salesOrderStatusEnmu[status];
  }
};

// 格式化日期
const formatDate = (date) => {
  if (!date) return "";
  const d = new Date(date);
  const year = d.getFullYear();
  const month = String(d.getMonth() + 1).padStart(2, "0");
  const day = String(d.getDate()).padStart(2, "0");
  return `${year}-${month}-${day}`; // 确保格式为 YYYY-MM-DD
};
export { formatDate, getStatusName };

// 0: {
// 	value: '待汇款',
// 	key: '0',
// 	color: '#f88f75',
// 	background: 'linear-gradient(135deg, rgba(255, 255, 255, .4), transparent) #f88f75',
// 	border: 'linear-gradient(to right, #fff, #fff), linear-gradient(90deg, #fff, #f88f75)'
// },
// 1: {
// 	value: '已完成',
// 	key: '1',
// 	color: '#91C8F8',
// 	background: 'linear-gradient(135deg, rgba(255, 255, 255, .4), transparent) #91C8F8',
// 	border: 'linear-gradient(to right, #fff, #fff), linear-gradient(90deg, #fff, #91C8F8)'
// },
// 2: {
// 	value: '已完成',
// 	key: '2',
// 	color: '#6ce17a',
// 	background: 'linear-gradient(135deg, rgba(255, 255, 255, .4), transparent) #6ce17a',
// 	border: 'linear-gradient(to right, #fff, #fff), linear-gradient(90deg, #fff, #6ce17a)'
// },
// 3: {
// 	value: '进行中',
// 	key: '3',
// 	color: '#48a760',
// 	background: 'linear-gradient(135deg, rgba(255, 255, 255, .4), transparent) #48a760',
// 	border: 'linear-gradient(to right, #fff, #fff), linear-gradient(90deg, #fff, #48a760)'
// },
// 4: {
// 	value: '审核中',
// 	key: '4',
// 	background: 'linear-gradient(135deg, rgba(255, 255, 255, .4), transparent) #91C8F8',
// 	border: 'linear-gradient(to right, #fff, #fff), linear-gradient(90deg, #fff, #91C8F8)'
// },
// 5: {
// 	value: '已撤销',
// 	key: '5',
// 	color: '#91C8F8',
// 	background: 'linear-gradient(135deg, rgba(255, 255, 255, .4), transparent) #91C8F8',
// 	border: 'linear-gradient(to right, #fff, #fff), linear-gradient(90deg, #fff, #91C8F8)'
// },
